package com.supermap.gwfs.message.controller;

import com.supermap.gwfs.message.service.AssistMessageService;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Map;

@RestController
@EnableAutoConfiguration
@RequestMapping(value = "assist")
public class AssistMessageController {
    @Resource
    AssistMessageService assistMessageService;

    @RequestMapping(value = "normalMessage")
    public String assistNormalMessage(HttpServletRequest request, @RequestBody Map<String,String> param) {
        return this.assistMessageService.generateMessage(param);
    }

    @RequestMapping(value = "cityMessage")
    public String assistCityMessage(HttpServletRequest request, @RequestBody Map<String,String> param) {
        return this.assistMessageService.generateCityMessage(param);
    }
}
